//
//  VIPBaseSignaling.h
//  TTProduct
//
//  Created by My mac on 2019/8/5.
//  Copyright © 2019年 TTProduct. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "VIPSignalingProtocol.h"
#import "VIPSignalingModel.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger,VIPSignalState) {
    VIPSignalStateLoginNO ,        // 没有登陆
    VIPSignalStateLogining ,       // 登陆中
    VIPSignalStateLoginOK ,        // 登陆成功
    VIPSignalStateLoginFailed ,    // 登陆错误
    VIPSignalStateLoseConnection,  // 登陆断开
    VIPSignalStateLogout,          // 登出
    VIPSignalStateKiched           // 踢出
};

typedef void (^SignaingResponse)(NSString* account, NSString* signalingString, NSString *signaingName); //接收消息
typedef void (^SignaingTokenTimeout)(void); // token已经失效

@interface VIPBaseSignaling : NSObject <VIPSignalingProtocol>

@property (copy, nonatomic) SignaingResponse response; // 接受消息响应
@property (copy, nonatomic) SignaingTokenTimeout tokenDidFailure; // token已经失效

@property (weak, nonatomic, readonly) VIPSignalModel *signal; // 信令的数据

@property (strong, nonatomic) VIPMessage *message;

@property (assign, nonatomic) VIPSignalState status; // 当前信令状态

@property (strong, nonatomic) NSString *flag; // 声网信令标示. 声网:A, 网易: N
@property (strong, nonatomic) NSString *signaingName; // 信令的代理商名称

@end

NS_ASSUME_NONNULL_END
